1. Field of the Invention
The present invention relates to a calculating apparatus, a calculating method, and their related technologies, and more particularly to a calculating apparatus, a calculating method, and their related technologies for calculating a thermocouple input temperature from a thermocouple output potential and an ambient temperature.
This application is a counterpart of Japanese patent application, Ser. No. 178777/2001, filed Jun. 13, 2001, the subject matter of which is incorporated herein by reference.
2. Related Background Art
For a calculating apparatus, which is hard to update a program because of a low calculational capacity like a general built-in micro controller, when performing a complicated calculation with two or more input variables, there has been a conventional art such as a calculating method of storing data at previously calculated sample points as data in a grid table format (hereinafter, referred to as table data) in an EEPROM (electrically erasable and programmable ROM) or a rewritable memory element such as a flash memory (hereinafter, referred to as a memory) and then calculating a result from the sample point data by using the input variables.
Hereinafter, the conventional art will now be described. The calculating method described below is carried out by a calculating apparatus including a memory in which the table data is stored and a calculating section. The calculating section includes a ROM (read only memory) in which the calculating method is stored. The ROM is stored with equations (1) to (4) described later and a calculating procedure using them.
1. First, the table data is generated. The table data is generated on the basis of a basic equation for calculating a result from a plurality of input variables. The input variables are given discrete values. The table data can be either generated inside the calculating apparatus or generated externally and then input to the calculating apparatus. The following equation (1) is shown here as an example of the basic equation. The equation (1) is a quartic expression for evaluating z to a thermocouple input temperature [° C.] from x to a thermocouple output [V] and y to an ambient temperature [° C.], which are assumed to be input variables.
[Eq. 1]z=4√(cx+(y+273.15)4)−273.15  (1)where the constant c is assumed to be 1.0×1011.
The table data shown in FIG. 8 is obtained by giving discrete values to the thermocouple output x and the ambient temperature y in the equation (1) and calculating the value of the thermocouple input temperature z. The thermocouple output x is given a discrete value delimited by 0.01V within a range of −0.03V to 0.09 V and the ambient temperature y is given a discrete value delimited by 10° C. within a range of −20° C. to 160° C.
2. Then, the generated table data is stored in a rewritable memory. The calculating procedure (described later) is stored in the ROM of the computer.
3. A result of the calculation is obtained from the input variables in the following calculating procedure:    (1) Extracting four calculation results existing at the closest position to a position on the calculation result table specified by the given input variables    (2) Calculating a result from the four calculation results extracted in (1) and the given input variables
It is assumed that input variables x=0.036 [V] and y=94 [° C.] are given here as an example. As shown in FIG. 9, four calculation results (z1, z2, z3, and z4) are obtained, existing at the closest position to a position specified by (x, y). Then, the result z is calculated from the z1, z2, z3, and z4 values and the x and y values. The calculating procedure is described below.
A rate of change on x ofs_x is evaluated from x1 and x2 in FIG. 9 according to equation (2).
[Eq. 2]ofs—x=(x−x1)/(x2−x1)  (2)
In the same manner, a rate of change on y ofs_y is evaluated from y1 and y2 in FIG. 9 according to equation (3).
[Eq. 3]ofs—y=(y−y1)/(y2−y1)  (3)
A calculation result z can be obtained here from equations (4–1), (4–2), and (4–3).
[Eq. 4]z—r1=z1+(z2−z1)×ofs—x  (4–1)z—,2=z3+(z4−z3)×ofs—y  (5)z=z—,1+(z—,2−z—,1)×ofs—y  (6)
Generally, when a calculation is made, it is often the case that a calculation result possible range is given as a specification and that a calculation result is unnecessary outside the given range. In such instance, the above conventional art needs to store only the calculation result possible range in a memory element. If so, it often results in a complicated structure of a stored table and the complexity causes a problem that a table write/read logic of the memory element becomes complicated.
It is assumed here that the result z possible range is specified to be 60 to 150 in FIG. 8, for example. A region actually stored in the memory in this instance is shown in FIG. 10. In FIG. 10, the region corresponding to the specification range (60 to 150) of z in FIG. 8 is half-tone dot meshed. The meshed region has a complicated shape and therefore the write/read logic for the memory is complicated.